;;;Isolate current Vport annotation (freeze other layers *vi0#* using VPLAYER)
;;;
;;;	AUTHOR: HENRY C. FRANCIS
;;;		425 N. ASHE ST.
;;;		SOUTHERN PINES, NC 28387
;;;              
;;;		All rights reserved without prejudice.
;;;	Copyright:	5-28-96
;;;	Edited:		5-28-96
;;;
(defun c:isovp ()
(if gvpno nil (load"gvpno"))
(gvpno)
(if viewno
  (setq vp_no viewno)
  (setq vp_no (uint 0 "" "Vport number to isolate" (if vp_no (1+ vp_no)1)))
)
(if (< vp_no 10)
  (progn
    (princ (strcat "\nVplayer freezing all \"*VI##*\" layers except \"*VI0" (itoa vp_no)"*\""))
    (command "_.vplayer" "freeze" "*vi##*" "" "thaw" (strcat "*vi0" (itoa vp_no)"*") "" "")
  )
  (progn
    (princ (strcat "\nVplayer freezing all \"*VI##*\" layers except \"*VI" (itoa vp_no)"*\""))
    (command "_.vplayer" "freeze" "*vi##*" "" "thaw" (strcat "*vi" (itoa vp_no)"*") "" "")
  )
)
(command "'resume")
(princ)
)
(defun c:isoprof ( / cisop cisop)
  (setq prof_no (uint 1 "" "Profile number to isolate" (if prof_no (1+ prof_no))))
  (if (<= prof_no 9)
    (setq no_str (strcat "0"(itoa prof_no)))
    (if (> prof_no 99)
      (setq cisop T)
      (setq no_str (itoa prof_no))
    )
  )
  (if cisop
    (princ "\nProfile must be less than 100. ")
    (command "_.vplayer"
             "thaw" "*" ""
             "freeze" "*|*,*ttlb*" ""
             "thaw" (strcat "c??prx" no_str "*") ""
             "freeze" "*pvgrid,*pbase,*dca_info,*pegct,*prof_info" "" ""
    )
  )
(princ)
)
(defun c:isottlb ()
  (command "._vplayer" "freeze" "newleg*,*_pe*,cgsprx*,cstmpx*" "" "")
  (princ)
)
(DEFUN C:ISOV# ()
  (SETQ vtoiso (UINT 1 "" "View number to isolate view-specific text in. " nil))
  (COMMAND ".LAYER" "OFF" "*" "ON" (strcat "*VI0" (itoa vtoiso) "*") "" "")
)
(defun c:isovpall ()
  (vl-load-com)
  (IF vpset NIL (LOAD "vpset" "\nFile VPSET.LSP not loaded! "))
  (FOREACH n (LAYOUTLIST)
    (SETVAR "CTAB" n)
    (SETQ vport_ss NIL)
    (SETQ vport_ss (SSGET "X" (LIST (CONS 0 "VIEWPORT")(CONS 410 n)(CONS 8 "*VI##*"))))
      (PROGN
	(SETQ vpcnt 0)
	(SETQ vpnumblst NIL)
	(WHILE (AND vport_ss (< vpcnt (SSLENGTH vport_ss))(SETQ vpent (ENTGET (SSNAME vport_ss vpcnt))))
          (IF (EQ(CDR (ASSOC 0 (ENTGET (SSNAME vport_ss vpcnt) (LIST "ACAD")))) "VIEWPORT")
	    (SETQ vpnumblst (APPEND vpnumblst (LIST (SUBSTR (CDR (ASSOC 8 vpent)) 5 2))))
          )
	  (SETQ vpcnt (1+ vpcnt))
	)
	(FOREACH o vpnumblst
	  (SETQ viewno (ATOI o))
	  (vpset viewno)
	  (c:isovp)
	)
        (vla-put-MSpace (vla-get-Activedocument (vlax-get-Acad-Object)) :vlax-false)
;;;        (COMMAND ".pspace")
      )
  )
  (PRINC)
)
